package player.ui;

import java.io.File;
import javax.swing.filechooser.FileFilter;
/**
 * Filter class for the JFileChooser. Limits the option to choose only MP3 file.
 * @author Pawin Suthipornopas 5510546123
 */
public class MP3Filter extends FileFilter {

	@Override
	public boolean accept(File f) {
		if (f.isDirectory())
			return true;
		return f.getName().endsWith(".mp3");
	}

	@Override
	public String getDescription() {
		return "MPEG-3 Audio Files (*.mp3)";
	}

}
